Skip to content

Conversation

@williambdean
Copy link
Contributor

Description

This uses the model_to_mermaid function for generating graph for a specific variable in the model.

Method bound to:

  • Distribution
  • Deterministic
  • Potential

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@williambdean
Copy link
Contributor Author

Display a single variable ...

Screenshot 2025-11-18 at 12 54 38 PM

... from a larger model ...

Screenshot 2025-11-18 at 12 54 20 PM

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.48%. Comparing base (bedbb17) to head (2569590).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pymc/util.py 25.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7967      +/-   ##
==========================================
- Coverage   91.48%   91.48%   -0.01%     
==========================================
  Files         116      116              
  Lines       18962    18969       +7     
==========================================
+ Hits        17348    17353       +5     
- Misses       1614     1616       +2     
Files with missing lines Coverage Δ
pymc/distributions/distribution.py 94.38% <100.00%> (+0.01%) ⬆️
pymc/model/core.py 93.32% <100.00%> (+0.01%) ⬆️
pymc/util.py 80.16% <25.00%> (-0.95%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@williambdean williambdean requested a review from ericmjl November 20, 2025 21:59
Copy link
Member

@ericmjl ericmjl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do you reckon we'll need to start testing the marimo-related features?

)

# https://docs.marimo.io/guides/integrating_with_marimo/displaying_objects/#option-1-implement-a-_display_-method
rv_out._display_ = types.MethodType(functools.partial(safe_display, model=model), rv_out)
Copy link
Member

@ricardoV94 ricardoV94 Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good time as any to remove pretty print from the variables and leave it to the model graphviz only.

There was an issue/ PR to remove those others for ipython. This is never going to be exhaustive because there are many other ways of creating variables for models

@ricardoV94
Copy link
Member

This goes in the opposite direction I suggest we should take in #7712

Algo graph representation instead of textual by default seems very verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants